// strstream                                                          -*-C++-*-
#ifndef INCLUDED_NATIVE_STRSTREAM
#define INCLUDED_NATIVE_STRSTREAM

#include <bsls_ident.h>
BSLS_IDENT("$Id: $")

//@PURPOSE: Provide functionality of the corresponding C++ Standard header.
//
//@SEE_ALSO: package bos+stdhdrs
//
//@DESCRIPTION: Provide functionality of the corresponding C++ standard
// header.  This file includes the compiler provided native standard header.
// In addition, in 'bde-stl' mode (used by Bloomberg managed code, see
// 'bos+stdhdrs.txt' for more information) include the corresponding header in
// 'bsl+bslhdrs' as well as 'bos_stdhdrs_prologue.h' and
// 'bos_stdhdrs_epilogue.h'.  This includes the respective 'bsl' types and
// places them in the 'std' namespace.

#include <bsls_compilerfeatures.h>

#include <bsls_platform.h>

#ifndef BSL_OVERRIDES_STD

#   ifndef INCLUDED_BOS_STDHDRS_INCPATHS
#   include <bos_stdhdrs_incpaths.h>
#   endif

#   if defined(BSLS_COMPILERFEATURES_SUPPORT_INCLUDE_NEXT)
#     include_next <strstream>
#   else
#     include BSL_NATIVE_CPP_DEPRECATED_HEADER(strstream)
#   endif

#else // defined(BSL_OVERRIDES_STD)

#   ifndef BOS_STDHDRS_PROLOGUE_IN_EFFECT
#   include <bos_stdhdrs_prologue.h>
#   endif

#   ifndef BOS_STDHDRS_RUN_EPILOGUE
#   define BOS_STDHDRS_RUN_EPILOGUE
#   define BOS_STDHDRS_EPILOGUE_RUN_BY_strstream
#   endif

#   ifndef INCLUDED_BOS_STDHDRS_INCPATHS
#   include <bos_stdhdrs_incpaths.h>
#   endif

// This logic is required to block the g++ warning triggered by including
// a "deprecated" header.  The warning is generated by g++'s internal
// backward/backward_warning.h header, so we block its effect by defining its
// include guard.  We only want to suppress this warning locally, so we
// undefine the guard below if we define it here.
#if defined(BSLS_PLATFORM_OS_SOLARIS) || defined(BSLS_PLATFORM_OS_LINUX)
#if defined(BSLS_PLATFORM_CMP_GNU) || defined(BSLS_PLATFORM_CMP_CLANG)
#ifndef _BACKWARD_BACKWARD_WARNING_H
#define BSL_STRSTREAM__UNDEF_BACKWARD_GUARD
#define _BACKWARD_BACKWARD_WARNING_H 1
#endif
#endif
#endif

#   if defined(BSLS_COMPILERFEATURES_SUPPORT_INCLUDE_NEXT)
#     include_next <strstream>
#   else
#     include BSL_NATIVE_CPP_DEPRECATED_HEADER(strstream)
#   endif

// Undefine the backward/backward_warning.h guard preventing backward
// compatibility warnings.
#ifdef BSL_STRSTREAM__UNDEF_BACKWARD_GUARD
#undef BSL_STRSTREAM__UNDEF_BACKWARD_GUARD
#undef _BACKWARD_BACKWARD_WARNING_H
#endif

#   include <bsl_strstream.h>

#   ifdef BOS_STDHDRS_EPILOGUE_RUN_BY_strstream
#   undef BOS_STDHDRS_EPILOGUE_RUN_BY_strstream
#   include <bos_stdhdrs_epilogue.h>
#   endif

#endif  // BSL_OVERRIDES_STD

#endif  // INCLUDED_NATIVE_STRSTREAM

// ----------------------------------------------------------------------------
// Copyright 2013 Bloomberg Finance L.P.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------- END-OF-FILE ----------------------------------
